import request from '@/utils/request'

// 示例 API 方法
export const userApi = {
    login: (data) => request({
        url: '/api/login',
        method: 'post',
        data
    }),

    getUserInfo: () => request({
        url: '/api/user/info',
        method: 'get'
    }),

    // 添加更多 API 方法...
}

export const commonApi = {
    upload: (file) => {
        const formData = new FormData()
        formData.append('file', file)
        return request({
            url: '/api/upload',
            method: 'post',
            data: formData,
            headers: {
                'Content-Type': 'multipart/form-data'
            }
        })
    }
} 